<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<!-- 1. 对一个按钮点击十次后，让某个div显示出来 -->

<body>
    <div id="app">

        <!-- <h1 v-if="vip===0"></h1>
        <h1 v-else-if="vip==10">黄金</h1>
        <button @click="vip++">升级</button> -->

        <!-- <div v-if="app >= 10">显示</div> -->

        <h1 v-if="app >= 10">显示</h1>
        <button @click="add">点击</button>


    </div>
</body>
<script src="./vue.js"></script>
<script>
    const { createApp, ref } = Vue;

    createApp({
        setup() {
            let app = ref(0);
            // let add = ref(0);
            function add() {
                app.value++;
            }

            return {
                app,
                add
            }
        }
    }).mount('#app')



    // createApp({
    //     setup() {

    //         let a = ref(0);
    //         let vip = ref(0)

    //         return {
    //             a,
    //             vip
    //         }
    //     }
    // }).mount('#app')
</script>

</html>